﻿using System;
using System.Linq;
using System.Text;
using Newtonsoft.Json;
using SqlSugar;

namespace Aioms.Models
{
    ///<summary>
    ///
    ///</summary>
    [SugarTable("device_type")]
    public class DeviceType
    {
        public DeviceType()
        {
            this.Created = DateTime.Now;
            this.Updated = DateTime.Now;

        }
        /// <summary>
        /// Desc:ID
        /// Default:
        /// Nullable:False
        /// </summary>           
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "id")]
        [JsonProperty("id")]
        public int Id { get; set; }

        /// <summary>
        /// Desc:企业id
        /// Default:
        /// Nullable:True
        /// </summary>           
        [SugarColumn(ColumnName = "eid")]
        [JsonProperty("eid")]
        public long Eid { get; set; }

        /// <summary>
        /// Desc:设备类型名称
        /// Default:
        /// Nullable:True
        /// </summary>           
        [SugarColumn(ColumnName = "name")]
        [JsonProperty("name")]
        public string Name { get; set; }

        /// <summary>
        /// Desc:父ID
        /// Default:0
        /// Nullable:True
        /// </summary>           
        [SugarColumn(ColumnName = "parent_id")]
        [JsonProperty("parent_id")]
        public int ParentId { get; set; }

        /// <summary>
        /// Desc:排序编号
        /// Default:0
        /// Nullable:True
        /// </summary>           
        [SugarColumn(ColumnName = "sort_id")]
        [JsonProperty("sort_id")]
        public int SortId { get; set; }

        /// <summary>
        /// 软删除标记：1.删除 0.未删除
        /// </summary>           
        [SugarColumn(ColumnName = "isdel")]
        [JsonProperty("isdel")]
        public int IsDel { get; set; } = 0;

        /// <summary>
        /// Desc:创建时间
        /// Default:CURRENT_TIMESTAMP
        /// Nullable:True
        /// </summary>           
        [SugarColumn(ColumnName = "created")]
        [JsonProperty("created")]
        public DateTime? Created { get; set; }

        /// <summary>
        /// Desc:更新时间
        /// Default:CURRENT_TIMESTAMP
        /// Nullable:True
        /// </summary>           
        [SugarColumn(ColumnName = "updated")]
        [JsonProperty("updated")]
        public DateTime? Updated { get; set; }

    }
}
